---
title: LocalAuthentication
description: A library that provides functionality for implementing the Fingerprint API (Android) or FaceID and TouchID (iOS) to authenticate the user with a face or fingerprint scan.
sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-52/packages/expo-local-authentication'
packageName: 'expo-local-authentication'
iconUrl: '/static/images/packages/expo-local-authentication.png'
platforms: ['android', 'ios']
---

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { AndroidPermissions, IOSPermissions } from '~/components/plugins/permissions';
import {
  ConfigReactNative,
  ConfigPluginExample,
  ConfigPluginProperties,
} from '~/ui/components/ConfigSection';
import { PlatformTags } from '~/ui/components/Tag/PlatformTags';

`expo-local-authentication` allows you to use the Biometric Prompt (Android) or FaceID and TouchID (iOS) to authenticate the user with a fingerprint or face scan.

## Known limitation

### iOS&ensp;<PlatformTags platforms={['ios']} />

The FaceID authentication for iOS is not supported in Expo Go. You will need to create a [development build](/develop/development-builds/introduction/) to test FaceID.

## Installation

<APIInstallSection />

## Configuration in app config

You can configure `expo-local-authentication` using its built-in [config plugin](/config-plugins/introduction/) if you use config plugins in your project ([Continuous Native Generation (CNG)](/workflow/continuous-native-generation/)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does **not** use CNG, then you'll need to manually configure the library.

<ConfigPluginExample>

```json app.json
{
  "expo": {
    "plugins": [
      [
        "expo-local-authentication",
        {
          "faceIDPermission": "Allow $(PRODUCT_NAME) to use Face ID."
        }
      ]
    ]
  }
}
```

</ConfigPluginExample>

<ConfigPluginProperties
  properties={[
    {
      name: 'faceIDPermission',
      platform: 'ios',
      description:
        'A string to set the [`NSFaceIDUsageDescription`](#permission-nsfaceidusagedescription) permission message.',
      default: '"Allow $(PRODUCT_NAME) to use Face ID"',
    },
  ]}
/>

<ConfigReactNative>

If you're not using Continuous Native Generation ([CNG](/workflow/continuous-native-generation/)) or you're using a native **ios** project manually, then you need to add `NSFaceIDUsageDescription` key to your **ios/[app]/Info.plist**:

```xml Info.plist
<key>NSFaceIDUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use FaceID</string>
```

</ConfigReactNative>

## API

```js
import * as LocalAuthentication from 'expo-local-authentication';
```

<APISection packageName="expo-local-authentication" apiName="LocalAuthentication" />

## Permissions

### Android

The following permissions are added automatically through this library's **AndroidManifest.xml**:

<AndroidPermissions permissions={['USE_BIOMETRIC', 'USE_FINGERPRINT']} />

### iOS

The following usage description keys are used by this library:

<IOSPermissions permissions={['NSFaceIDUsageDescription']} />
